<template>
  <div>
    <table-view ref="view"
                :searchAttrs="searchAttrs"
                :primaryKey="primaryKey"
                :listApiName="listApiName"
                :deleteApiName="deleteApiName"
                :exportApiName="exportApiName"
                :saveAuthName="saveAuthName"
                :deleteAuthName="deleteAuthName"
                :showAttrs="showAttrs"
    >
    </table-view>
    <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
  </div>
</template>


<script>
import tableView from '@/components/tableView'
import basicMixins from '@/utils/commonViewMixins'
import AddOrUpdate from './productbatchnoqueue-add-or-update'

export default {
  mixins: [basicMixins],
  data() {
    return {
      primaryKey: 'id',
      listApiName: 'productApi/listProductBatchNoQueue',
      deleteApiName: 'productApi/deleteProductBatchNoQueue',
      exportApiName: 'productApi/getProductBatchNoQueueExport',
      saveAuthName: 'product:productbatchnoqueue:save',
      deleteAuthName: 'product:productbatchnoqueue:delete',
      searchAttrs: {},
      showAttrs: {
        id: {
          label: 'id'
        },
        purchaseProductBatchNo: {
          label: '批号'
        },
        productId: {
          label: '产品ID'
        },
        productNo: {
          label: '产品名称'
        },
        productPutInStorageId: {
          label: '入库ID'
        },
        putInStorageNumber: {
          label: '入库数量'
        },
        purchaseUnitPrice: {
          label: '采购单价'
        },
        leaveStorageNumber: {
          label: '出库数量'
        },
        leaveFinishTime: {
          label: '出库完成时间'
        },
        location: {
          label: '仓库'
        },
        status: {
          label: '状态'
        },
        createTime: {
          label: '创建时间'
        },
        createUser: {
          label: '创建者'
        },
        updateTime: {
          label: '更新时间'
        },
        updateUser: {
          label: '更新者'
        },
        contractPurchaseId: {
          label: '采购合同ID'
        },
        purchaseProductId: {
          label: '采购订单ID'
        }
      }
    }
  },
  components: {
    tableView,
    AddOrUpdate
  }
}
</script>
